
/**
 * Record pre-delete trigger.
 * Validate the record to be deleted.
 * When false is returned the record will not be deleted in the database.
 * When an exception is thrown the record will also not be deleted in the database but it will be added to databaseManager.getFailedRecords(),
 * the thrown exception can be retrieved via record.exception.getValue().
 *
 * @param {JSRecord<db:/infocom/prod_categorias>} record record that will be deleted
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"743E1D7A-1077-477D-8EA4-9909233BA7BB"}
 */
function onRecordDelete(record) {
	if (record.prod_categorias_to_productos.getSize() > 0)
	{
		return false
	}
	return true
}
